package com.freemalll.merchant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.freemalll.merchant.domain.dto.MerBackCardDto;
import com.freemalll.merchant.domain.entity.MerBankCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *  映射层。
 *
 * @author songshixiong
 * @since 2025-05-26
 */
@Mapper
public interface MerBankCardMapper extends BaseMapper<MerBankCard> {

    @Select(" select card_id,payment_preference,mer_id,card_account_name,card_type,card_no,card_bank_name,card_prcptcd,card_status from mer_bank_card where delete_flag = 0 and mer_id = #{merId} order by add_time asc ")
    List<MerBackCardDto> listByMerId(@Param("merId") String merId);
}
